/**
 * Copyright (c) 2013-2015, Jieven. All rights reserved.
 *
 * Licensed under the GPL license: http://www.gnu.org/licenses/gpl.txt
 * To use it on other terms please contact us at 1623736450@qq.com
 */
package com.rock.sys.controller;

import java.util.List;

import com.eova.common.base.BaseController;
import com.eova.config.EovaConst;
import com.eova.core.menu.config.MenuConfig;
import com.eova.model.Button;
import com.eova.model.Menu;
import com.eova.model.MetaObject;
import com.eova.model.User;

/**
 * 单表图
 * 
 * @author jialiheng
 * 
 */
public class RockChartController extends BaseController {

	public void singlechart() {

		String menuCode = this.getPara(0);
		
		// 获取元数据
		Menu menu = Menu.dao.findByCode(menuCode);
		if (menu == null) {
			throw new RuntimeException("菜单不存在,请检查:" + menuCode);
		}
		MenuConfig config = menu.getConfig();
		String objectCode = config.getObjectCode();
		MetaObject object = MetaObject.dao.getByCode(objectCode);
		if (object == null) {
			throw new RuntimeException("元对象不存在,请检查:" + objectCode);
		}

		setAttr("menu", menu);
		setAttr("object", object);

		render("/ui_rock/template/singlechart.html");
	}

}